package factoryTest;

import static org.junit.Assert.*;

import org.junit.Test;

import factory.ActionFactory;
import factory.BrowseUrlAction;
import factory.SearchAction;

public class ActionFactoryTest {
	
	@Test
	public void testFactory(){
		ActionFactory factory = new ActionFactory();
		assertTrue("Should be instance of Browser",factory.factoryMethod("browser") instanceof BrowseUrlAction);
		
		assertTrue("Should be instance of Search",factory.factoryMethod("search") instanceof SearchAction);
		
		assertTrue("Should be null",factory.factoryMethod("searcasdasdasdh") == null);
		
	}
}
